#include "Camara.h"


Camara::Camara(void){
	this->eye[0] = EYE_0;
	this->eye[1] = EYE_1;
	this->eye[2] = EYE_2;
	this->centre[0] = CENTRE_0;
	this->centre[1] = CENTRE_1;
	this->centre[2] = CENTRE_2;
	this->up[0] = UP_0;
	this->up[1] = UP_1;
	this->up[2] = UP_2;
}


void Camara::lookat(){
	gluLookAt (eye[0], eye[1], eye[2], centre[0], centre[1], centre[2], up[0], up[1], up[2]);
}

void Camara::setEye(GLdouble x,GLdouble y,GLdouble z){
	this->eye[0] = x;
	this->eye[1] = y;
	this->eye[2] = z;
}

void Camara::setCentre(GLdouble x,GLdouble y,GLdouble z){
	this->centre[0] = x;
	this->centre[1] = y;
	this->centre[2] = z;
}

void Camara::setUp(GLdouble x,GLdouble y,GLdouble z){
	this->up[0] = x;
	this->up[1] = y;
	this->up[2] = z;

}

void Camara::incEye(GLdouble x,GLdouble y,GLdouble z){
	this->eye[0] += x;
	this->eye[1] += y;
	this->eye[2] += z;
}

void Camara::incCentre(GLdouble x,GLdouble y,GLdouble z){
	this->centre[0] += x;
	this->centre[1] += y;
	this->centre[2] += z;
}

void Camara::incUp(GLdouble x,GLdouble y,GLdouble z){
	this->up[0] += x;
	this->up[1] += y;
	this->up[2] += z;

}


GLdouble Camara::getEye(int i) {
	return this->eye[i];
}

GLdouble Camara::getCentre(int i) {
	return this->centre[i];
}

Camara::~Camara(void){

}
